package com.lemon.core.common.lang.util;

/**
 * @author lemon
 * @ClassName SystemEnvUtils
 * @desc
 * @Date 2018/11/27 10:45
 * @Version 1.0
 **/
public class SystemEnvUtils {

    public static final boolean IS_PROD;

    static {
        String sysEnv = System.getenv("MOP_ENV_NAME");
        String defaultEnv = sysEnv == null || !sysEnv.equalsIgnoreCase("PROD") ? "TEST" : "PROD";
        IS_PROD = System.getProperty("mop.env.name", defaultEnv).toUpperCase().contains("PROD");
    }

    public static boolean isLinuxOS() {
        String os = System.getProperty("os.name");
        if(os.toLowerCase().startsWith("win")) {
            return false;
        }
        return true;
    }
}
